.class public Lcom/zuimeia/ui/touchdetector/Vector2D;
.super Landroid/graphics/PointF;
.source "Vector2D.java"


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 8
    invoke-direct {p0}, Landroid/graphics/PointF;-><init>()V

    .line 9
    return-void
.end method

.method public constructor <init>(FF)V
    .registers 3
    .param p1, "x"    # F
    .param p2, "y"    # F

    .prologue
    .line 12
    invoke-direct {p0, p1, p2}, Landroid/graphics/PointF;-><init>(FF)V

    .line 13
    return-void
.end method

.method public static getAngle(Lcom/zuimeia/ui/touchdetector/Vector2D;Lcom/zuimeia/ui/touchdetector/Vector2D;)F
    .registers 12
    .param p0, "vector1"    # Lcom/zuimeia/ui/touchdetector/Vector2D;
    .param p1, "vector2"    # Lcom/zuimeia/ui/touchdetector/Vector2D;

    .prologue
    .line 16
    invoke-virtual {p0}, Lcom/zuimeia/ui/touchdetector/Vector2D;->normalize()V

    .line 17
    invoke-virtual {p1}, Lcom/zuimeia/ui/touchdetector/Vector2D;->normalize()V

    .line 18
    const-wide v2, 0x404ca5dc1a63c1f8L

    iget v4, p1, Lcom/zuimeia/ui/touchdetector/Vector2D;->y:F

    float-to-double v4, v4

    iget v6, p1, Lcom/zuimeia/ui/touchdetector/Vector2D;->x:F

    float-to-double v6, v6

    invoke-static {v4, v5, v6, v7}, Ljava/lang/Math;->atan2(DD)D

    move-result-wide v4

    iget v6, p0, Lcom/zuimeia/ui/touchdetector/Vector2D;->y:F

    float-to-double v6, v6

    iget v8, p0, Lcom/zuimeia/ui/touchdetector/Vector2D;->x:F

    float-to-double v8, v8

    invoke-static {v6, v7, v8, v9}, Ljava/lang/Math;->atan2(DD)D

    move-result-wide v6

    sub-double/2addr v4, v6

    mul-double v0, v2, v4

    .line 19
    .local v0, "degrees":D
    double-to-float v2, v0

    return v2
.end method


# virtual methods
.method public normalize()V
    .registers 5

    .prologue
    .line 23
    iget v1, p0, Lcom/zuimeia/ui/touchdetector/Vector2D;->x:F

    iget v2, p0, Lcom/zuimeia/ui/touchdetector/Vector2D;->x:F

    mul-float/2addr v1, v2

    iget v2, p0, Lcom/zuimeia/ui/touchdetector/Vector2D;->y:F

    iget v3, p0, Lcom/zuimeia/ui/touchdetector/Vector2D;->y:F

    mul-float/2addr v2, v3

    add-float/2addr v1, v2

    float-to-double v2, v1

    invoke-static {v2, v3}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v2

    double-to-float v0, v2

    .line 24
    .local v0, "length":F
    iget v1, p0, Lcom/zuimeia/ui/touchdetector/Vector2D;->x:F

    div-float/2addr v1, v0

    iput v1, p0, Lcom/zuimeia/ui/touchdetector/Vector2D;->x:F

    .line 25
    iget v1, p0, Lcom/zuimeia/ui/touchdetector/Vector2D;->y:F

    div-float/2addr v1, v0

    iput v1, p0, Lcom/zuimeia/ui/touchdetector/Vector2D;->y:F

    .line 26
    return-void
.end method
